const fs = require("fs");

const readStream = fs.createReadStream("input.txt");


//保存数据
let stringRead = "";


readStream.on("data", function (str) {
    stringRead += str;
});

//读取完成
readStream.on("end", function (str) {
    console.log(stringRead);
});

//读取出错了
readStream.on("error", function (error) {
    console.log(error);
});
